1. Field of the Invention
The present invention relates to an adjustment device and method for adjusting control parameters of a controller for a servo motor used in a milling machine, robot, printer, etc.
2. Description of the Related Art
In general, a control system for a servo motor includes at least one of: a closed-loop position control system in which a driving instruction is sent to the servo motor such that an error amount between a rotational position instruction from a controller and rotational position information from the servo motor becomes minimum; and a closed-loop velocity control system in which a driving instruction is sent to the servo motor such that an error amount between a rotational velocity instruction from the controller and rotational velocity information obtained by differentiating the above-mentioned rotational position information becomes minimum.
FIG. 21 is a block diagram showing a control system for a conventional servo motor. As is shown in FIG. 21, the control system consists primarily of a velocity loop for feeding back rotational velocity information of the servo motor and a position loop for feeding back rotational position information of the servo motor. An integrator 6 for removing a velocity servo offset is inserted in the velocity loop. Actual model 109 represents the servo motor and a load provided coaxially with the servo motor. Herein, JM represents inertia of a rotator of the servo motor, while JL represents inertia of the load. The rotational position of the servo motor is detected by a rotary encoder (not shown) which is an angle measuring sensor. The detected rotational position is fed back to the position loop. The amount of position feedback is determined by a position proportional gain K.sub.p provided in the position loop. The position proportional gain K.sub.p is adjusted so that an error amount E.sub.x between a rotational position instruction X.sub.r and a rotational position signal X representing the actual rotational position of the servo motor becomes sufficiently small while maintaining the stability of the position loop. The rotational position signal X, which is detected by the rotary encoder, is converted into a rotational velocity signal V by a differentiator 7, and is fed back to the velocity loop. The amount of velocity feedback is determined by a velocity proportional gain K.sub.vp provided in the velocity loop. The velocity proportional gain K.sub.vp is adjusted, in accordance with an output from the position proportional gain K.sub.p, so that an error amount E.sub.v between a rotational velocity instruction V.sub.r and the rotational velocity signal V becomes minimum without allowing the load to vibrate. The gain of the integrator 6 in the velocity loop is determined based on a velocity integral gain K.sub.vi. The velocity integral gain K.sub.vi is adjusted so that an offset between the rotational velocity instruction X.sub.r and the rotational velocity signal X of the servo motor becomes minimum without allowing vibration to occur.
FIG. 22 is a block diagram showing a conventional adjustment device for adjusting control parameters of a servo motor. As is shown in FIG. 22, the adjustment device includes an instruction generator 1, a position proportional gain adjuster 3, a velocity proportional gain adjuster 4, a velocity integral gain adjuster 5, an integrator 6, a differentiator 7, a D/A (Digital/Analog) convertor 8, a driving circuit 9, a servo motor 10, a load 11 for the servo motor, a rotary encoder 12 provided coaxially with the servo motor, and a numerical value inputting section 13. The instruction generator 1 can be realized using an NC (Numerical Control) device. The portion enclosed by a dotted line is to be processed by means of a micro computer (not shown).
An operation of the adjustment device having the above configuration will now be described.
A rotational position instruction X.sub.r for the servo motor 10 is sent from the instruction generator 1 to the micro computer. The micro computer also receives a rotational position signal X output from the rotary encoder 12 so as to derive a rotational position error amount E.sub.x as a difference between the rotational position signal X and the rotational position instruction X.sub.r. The rotational position signal X represents a rotational position of the servo motor 10. Next, the position proportional gain adjuster 3 multiplies the rotational position error amount E.sub.x by a position proportional gain so as to produce a rotational velocity instruction V.sub.r. The rotational velocity instruction V.sub.r is applied to the velocity loop. A difference is derived between the rotational velocity instruction V.sub.r and a rotational velocity signal V obtained by differentiating the rotational position signal X at the differentiator 7, so as to produce a rotational velocity error amount signal E.sub.v. The rotational velocity error amount signal E.sub.v is subjected to a proportional compensation and an integral compensation. Herein, a proportional compensation (conducted by the velocity proportional gain adjuster 4) refers to multiplication of the rotational velocity error amount signal E.sub.v by a velocity proportional gain; an integral compensation refers to multiplication of the rotational velocity error amount signal E.sub.v by a velocity integral gain (conducted by the velocity integral gain adjuster 5) and integration of the resultant product (conducted by the integrator 6). The result of the proportional compensation and the result of the integral compensation are added as shown. The resultant sum is transferred to the D/A convertor 8. An output from the D/A convertor 8 is converted into a triple-phase current instruction in the driving circuit 9. The triple-phase current instruction drives the servo motor 10 so as to move the load 11 to a desired rotational position.
Setting of the position proportional gain, the velocity proportional gain, and the velocity integral gain (hereinafter, these and other gain values may be referred generally to as `control gains` for conciseness) is conducted by inputting these control gains by means of the numerical value inputting section 13 proportional gain adjuster 3, the velocity proportional gain adjuster 4, end the velocity integral gain adjuster 5. Each of the gain adjusters 3 to 5 multiplies an input control signal by the transferred control gain, as is described above.
Next, a conventional adjustment method for adjusting control parameters of a servo motor will be described in detail.
FIG. 23 is a Bode diagram showing frequency characteristics of an open-loop transfer function with respect to velocity of a control system of a servo motor. In FIG. 23, graph (1) shows a gain characteristic curve, while graph (2) shows a phase characteristic curve. In graph (1), an intersection of curve a.sub.1 (indicated by the solid line) and an axis on which the feedback gain is 0 dB is commonly referred to as a gain crossover. The frequency at the gain crossover is defined as f.sub.O. In graph (2), the difference between a phase angle of curve b.sub.I at the frequency f.sub.O and -180.degree. is commonly referred to as a phase margin. The phase margin is used as an amount for evaluation of the stability of the control system.
The velocity proportional gain K.sub.vp is a value of a proportional term of the velocity loop. The velocity proportional gain K.sub.vp determines the gain crossover frequency and the feedback gain of the velocity loop. By adjusting the velocity proportional gain K.sub.vp, it becomes possible to sufficiently increase the feedback gain, even in cases where the load 11 has a high-mode mechanical resonance, without allowing the control system to oscillate due to a mechanical resonance component being fed back thereto, while keeping the feedback gain within a range where the control system remains stable. Characteristics of the mechanical resonance are shown in FIG. 23. Resonance occurs within the control system in cases where a peak of the feedback at a mechanical resonance frequency exceeds 0 dB. The velocity integral gain K.sub.vi, by which the rotational velocity error amount signal E.sub.v is multiplied at the velocity integral gain adjuster 5, is a value of an integral term of the velocity loop. The velocity integral gain K.sub.vi serves to remove an offset of the velocity loop. The offset decreases as the velocity integral gain K.sub.vi increases; however, as the velocity integral gain K.sub.vi increases, the phase margin at the gain crossover decreases, thus making the control system unstable. The velocity integral gain K.sub.vi, as well as the velocity proportional gain K.sub.vp, is adjusted so that the phase margin at the gain crossover becomes sufficiently large and the feedback gain in a low frequency band becomes sufficiently large but not large enough to allow the control system to become unstable. The position proportional gain K.sub.p, as well as the velocity integral gain K.sub.vi, is adjusted so that the feedback gain is sufficiently large but not large enough to allow the control system to become unstable.
In general, the magnitude of the feedback gain and the stability of the control system can be comprehended by observing, in the case of positioning control, a rotational position instruction and a rotational position signal; and in the case of rotation control, a rotational velocity instruction and a rotational velocity signal. A measurement apparatus such as an oscilloscope can be used. Hereinafter, a conventional adjustment method for adjusting control parameters of a servo motor will be described with reference to FIG. 22.
First, adjustment during the positioning control is described. Initially, the velocity proportional gain K.sub.vp, the velocity integral gain K.sub.vi, and the position proportional gain K.sub.p are set at sufficiently small values. A rotational position instruction X.sub.r is input to the servo motor 10. The velocity proportional gain K.sub.vp is gradually increased while the rotational position signal X is observed by an oscilloscope. As soon as the rotational position signal X starts vibrating at a frequency substantially equal to the mechanical resonance frequency, the velocity proportional gain K.sub.vp is slightly decreased. This is because it is presumable that a mechanical resonance component is fed back to the control system. The adjustment of the velocity proportional gain K.sub.vp is completed when the vibration of the rotational position signal X is eliminated.
Next, the velocity integral gain K.sub.vi is gradually increased while the rotational position signal X is observed by an oscilloscope (not shown). As soon as the rotational position signal X starts vibrating at a frequency substantially equal to the gain crossover frequency, the velocity integral presumable that the phase margin at the gain crossover is inadequate. The adjustment of the velocity integral gain K.sub.vp is completed when the vibration of the rotational position signal X is eliminated. Last of all, the position proportional gain K.sub.p is adjusted. If the feedback gain is inadequate, the position proportional gain K.sub.p is gradually increased so that the error amount E.sub.x decreases. However, the phase margin at the gain crossover decreases as the position proportional gain K.sub.p increases, as in the case of adjustment of the velocity integral gain K.sub.pv. Accordingly, the position proportional gain K.sub.p is adjusted so that the error amount E.sub.x becomes minimum without allowing the rotational position signal X to start vibrating.
Next, adjustment during the rotation control is described. Initially, as in the case of the positioning control, the velocity proportional gain K.sub.vp, the velocity integral gain K.sub.vi, and the position proportional gain K.sub.p are set at sufficiently small values. In a control system as shown in FIG. 22, the instruction generator 1 outputs a rotational position instruction X.sub.r to the servo motor 10. Simultaneously, the rotational velocity signal V and the rotational velocity instruction V.sub.r are observed by means of an oscilloscope. During the rotation control, vibration due to mechanical resonance and/or reduction in the phase margin may occur after a point where the servo motor 10 switches from an acceleration operation to a constantspeed operation, and after a point where the servo motor 10 switches from a deceleration operation to a zero-speed operation (i.e. a halt). The magnitude of the feedback gain can be inferred from the error amount E.sub.v between the rotational velocity instruction V.sub.r and the rotational velocity signal V during acceleration or deceleration of the servo motor 10. Based on these characteristics, the respective control gains can be adjusted by moving the servo motor 10 several times, through a similar method to that used for the positioning control.
However, such a conventional adjustment device suffers from the drawback that it is necessary to adjust the all the control gains, i.e. the velocity proportional gain, velocity integral gain, and position proportional gain. More specifically, a measurement apparatus such as an oscilloscope is required for observation of the rotational velocity signal, the rotational position signal, and the like. The observation is conducted while rotation instructions are given to the servo motor. The rotation state of the servo motor being monitored accordingly, the three control gains must repeatedly be adjusted while maintaining a fine balance thereamong, since they interact with one another. Moreover, the adjustment of the control gains is disadvantageous in that only skilled or experienced adjustment engineers can perform the adjustment sufficiently.
Moreover, such a conventional adjustment method for adjusting the control parameters is troublesome in that, when the control gains are varied, every control gain must be input by means of the numerical value inputting section. In cases where it is unknown in which ranges of control gains the control system remains stable, inputting a value which is substantially outside such ranges to any of the gain adjusters can cause a sudden change in the rotation of the servo motor. As a result, an excess oscillation may be generated, possibly destroying the servo motor. Moreover, in a conventional adjustment method, it is necessary to repeat many times the process of inputting a value for each control gain, where the value can only be adjusted by being increased or decreased by a small value.
In cases where, after the adjustment for the control gains of the servo motor has been completed, the load for the servo motor and/or the friction during rotation of the servo motor have drastically changed due to temporal deterioration or a change in circumstances, it becomes necessary to readjust the control gains. However, with a conventional adjustment device, it is not possible to store data such as the waveform of a control signal for the servo motor and values of the control gains during or after the adjustment of the control gains. Therefore, the adjustment data of a current adjustment is not available when a readjustment must be conducted, thus making it impossible to compare the current adjustment data and the subsequent readjustment data. This fact hinders the adjustment and readjustment processes of the control gains.
Although the adjustment data can be preserved by taking a photograph of the CRT display of the measurement apparatus such as an oscilloscope, or by using an apparatus having such a recording function, preparation and set up of such measurement apparatuses requires time, thus making the adjustment inconvenient. Moreover, the measurement apparatuses are again required at the time of the readjustment, increasing the time required therefore.
Moreover, even in cases where the load for the servo motor and/or the friction during rotation of the servo motor of a conventional adjustment device slightly vary due to temporal deterioration or change in circumstances, it is necessary to stop the operation of the machinery to which the servo motor is connected in order to readjust the control gains of the servo motor.
Moreover, when the load temporarily becomes excessive so that the stability of the control loop is lowered or the control loop goes out of control, a conventional adjustment device is not capable of automatically detecting such situations and readjusting the control parameters so as to render the control loop stable.
Moreover, even when the control loop manages stability, the desired response cannot be attained if it is impossible to set the loop gain at a high value. Therefore, there is a strong need in the art for an adjustment device and method which overcomes the following problems associated with conventional adjustment devices: how to restrain the aforementioned mechanical vibration; how to detect, in adjustment of the control parameters, the magnitude and the frequency of the resonance without using a special measurement apparatus; how to best utilize limited hardware and software resources for the adjustment device; how to conduct efficiently the adjustment of the control parameters in view of possible resonance(s).